import { Form } from "@/components/layout/form/form";
import { IMAGES, SELECT, TEXT, CHECKBOX, DATETIMES } from "@/utils/enums/type-enums";
import Storage from "@/utils/storage";
import { ACCESS_TOKEN_KEY } from "@/utils/enums/cache-enum";
export const productAddForms: Form[] = [
  {
    label: null,
    card: [
      { line: true },
      { type: TEXT, label: '账号名称', name: 'loginName', span: 5, placeholder: '请输入产品名称' },
      { type: SELECT, label: '账号类型', name: 'userTypeId', span: 5, options: [] },
      {
        type: SELECT, label: '是否启用', name: 'enabled', span: 5, options: [
          { label: '启用', value: 0 },
          { label: '禁用', value: 1 },
        ]
      },
      { line: true },
      { type: TEXT, label: '姓名', name: 'displayName', span: 5, placeholder: '请输入产品名称' },
      {
        type: SELECT, label: '性别', name: 'sex', span: 5, options: [
          { label: '男', value: 1 },
          { label: '女', value: 2 },
        ]
      },
      { type: DATETIMES, label: '生日', name: 'birthday', span: 5, placeholder: '请输入产品名称' },
      { line: true },
      { type: TEXT, label: '手机号', name: 'cellphone', span: 5, placeholder: '请输入产品名称' },
      { type: TEXT, label: '备用电话', name: 'telephone', span: 5, placeholder: '请输入产品名称' },
      { line: true },
      { line: true },
      { type: SELECT, label: '名族', name: 'nation', span: 5, options: [] },
      { type: TEXT, label: '籍贯', name: 'nativePlace', span: 5, placeholder: '请输入产品名称' },
      { type: TEXT, label: '详细地址', name: 'addressDetails', span: 5, placeholder: '请输入产品名称' },
    ]
  }
]

export const productAddRules = {
  loginName: [{ required: true, message: '只能输入6-50 位', trigger: 'blur', min: 6, max: 50, }],
  userTypeId: [{ required: true, message: '账号类型不能为空', trigger: 'blur' }],
  displayName: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
  cellphone: [{ required: true, message: '手机号不能为空', trigger: 'blur', type: "integer" }],
}